package 网约车;

import org.apache.hadoop.io.WritableComparable;

        import java.io.DataInput;
        import java.io.DataOutput;
        import java.io.IOException;

public class Data implements WritableComparable<Data> {
    private String companyid;
    private String address;
    private String orderid;
    private String ordertime;
    private String canceltime;
    private String operator;
    private String canceltypecode;
    private String cancelreason;


    public int compareTo(Data o) {
        return 0;
    }


    public void write(DataOutput dataOutput) throws IOException {
        dataOutput.writeUTF(companyid);
        dataOutput.writeUTF(address);
        dataOutput.writeUTF(orderid);
        dataOutput.writeUTF(ordertime);
        dataOutput.writeUTF(canceltime);
        dataOutput.writeUTF(operator);
        dataOutput.writeUTF(canceltypecode);
        dataOutput.writeUTF(cancelreason);
    }


    public void readFields(DataInput dataInput) throws IOException {
        companyid = dataInput.readUTF();
        address = dataInput.readUTF();
        orderid = dataInput.readUTF();
        ordertime = dataInput.readUTF();
        canceltime = dataInput.readUTF();
        operator = dataInput.readUTF();
        canceltypecode = dataInput.readUTF();
        cancelreason = dataInput.readUTF();
    }

    public void set(String companyid, String address, String orderid, String ordertime, String canceltime, String operator, String canceltypecode, String cancelreason) {
        this.companyid = companyid;
        this.address = address;
        this.orderid = orderid;
        this.ordertime = ordertime;
        this.canceltime = canceltime;
        this.operator = operator;
        this.canceltypecode = canceltypecode;
        this.cancelreason = cancelreason;
    }

    @Override
    public String toString() {
        return companyid + "|" + address + "|" + orderid + "|" + ordertime + "|" + canceltime + "|" +
                operator + "|" + canceltypecode + "|" + cancelreason + "|";
    }

    public String getCompanyid() {
        return companyid;
    }

    public void setCompanyid(String companyid) {
        this.companyid = companyid;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    public String getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(String ordertime) {
        this.ordertime = ordertime;
    }

    public String getCanceltime() {
        return canceltime;
    }

    public void setCanceltime(String canceltime) {
        this.canceltime = canceltime;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getCanceltypecode() {
        return canceltypecode;
    }

    public void setCanceltypecode(String canceltypecode) {
        this.canceltypecode = canceltypecode;
    }

    public String getCancelreason() {
        return cancelreason;
    }

    public void setCancelreason(String cancelreason) {
        this.cancelreason = cancelreason;
    }
}
